import { createRouter, createWebHistory } from 'vue-router';

//两个页面组件
import HostList from '../views/HostList.vue';
import HostDetail from '../views/HostDetail.vue';

const routes = [
  { path: '/', component: HostList },
  { path: '/detail', name: 'HostDetail', component: HostDetail, props: true }
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;
